/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.giant.entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author taticay
 */
@Entity
@Table(name = "w_claim_image")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "WClaimImage.findAll", query = "SELECT w FROM WClaimImage w"),
    @NamedQuery(name = "WClaimImage.findByIdClaimImage", query = "SELECT w FROM WClaimImage w WHERE w.idClaimImage = :idClaimImage"),
    @NamedQuery(name = "WClaimImage.findByIdClaim", query = "SELECT w FROM WClaimImage w WHERE w.idClaim = :idClaim"),
    @NamedQuery(name = "WClaimImage.findByIdTypeClaimImg", query = "SELECT w FROM WClaimImage w WHERE w.idTypeClaimImg = :idTypeClaimImg")})
public class WClaimImage implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id_claim_image")
    private Integer idClaimImage;
    @Basic(optional = false)
    @NotNull
    @Column(name = "id_claim")
    private int idClaim;
    @Basic(optional = false)
    @NotNull
    @Column(name = "id_type_claim_img")
    private int idTypeClaimImg;
    @Basic(optional = false)
    @NotNull
    @Lob
    @Column(name = "image")
    private byte[] image;

    public WClaimImage() {
    }

    public WClaimImage(Integer idClaimImage) {
        this.idClaimImage = idClaimImage;
    }

    public WClaimImage(Integer idClaimImage, int idClaim, int idTypeClaimImg, byte[] image) {
        this.idClaimImage = idClaimImage;
        this.idClaim = idClaim;
        this.idTypeClaimImg = idTypeClaimImg;
        this.image = image;
    }

    public Integer getIdClaimImage() {
        return idClaimImage;
    }

    public void setIdClaimImage(Integer idClaimImage) {
        this.idClaimImage = idClaimImage;
    }

    public int getIdClaim() {
        return idClaim;
    }

    public void setIdClaim(int idClaim) {
        this.idClaim = idClaim;
    }

    public int getIdTypeClaimImg() {
        return idTypeClaimImg;
    }

    public void setIdTypeClaimImg(int idTypeClaimImg) {
        this.idTypeClaimImg = idTypeClaimImg;
    }

    public byte[] getImage() {
        return image;
    }

    public void setImage(byte[] image) {
        this.image = image;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idClaimImage != null ? idClaimImage.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof WClaimImage)) {
            return false;
        }
        WClaimImage other = (WClaimImage) object;
        if ((this.idClaimImage == null && other.idClaimImage != null) || (this.idClaimImage != null && !this.idClaimImage.equals(other.idClaimImage))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.giant.entities.WClaimImage[ idClaimImage=" + idClaimImage + " ]";
    }
    
}
